<template>
    <div>
        <CommentMain
            :commentData="comment"
            v-for="(comment, index) in commentList"
            :key="index"
        />
    </div>
</template>

<script>
    import CommentMain from "../components/Comment/Main";
    export default {
        components: {
            CommentMain,
        },
        // 模拟一下评论的数据结构
        data() {
            return {
                commentList: [],
            };
        },
        created() {
            this.$axios({
                url: "/post_comment/1",
            }).then((res) => {
                console.log(res.data);
                this.commentList = res.data.data;
            });
        },
    };
</script>

<style>
</style>